Optimal. Leaf size=64 \[ \frac{a^2 c (B+i A) \tan ^2(e+f x)}{2 f}+\frac{a^2 A c \tan (e+f x)}{f}+\frac{i a^2 B c \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0823462, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac{a^2 c (B+i A) \tan ^2(e+f x)}{2 f}+\frac{a^2 A c \tan (e+f x)}{f}+\frac{i a^2 B c \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 43
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx &=\frac{(a c) \operatorname{Subst}(\int (a+i a x) (A+B x) \, dx,x,\tan (e+f x))}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (a A+a (i A+B) x+i a B x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a^2 A c \tan (e+f x)}{f}+\frac{a^2 (i A+B) c \tan ^2(e+f x)}{2 f}+\frac{i a^2 B c \tan ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 2.61344, size = 109, normalized size = 1.7 \[ \frac{a^2 c \sec (e) \sec ^3(e+f x) (3 (B+i A) \cos (2 e+f x)+3 (B+i A) \cos (f x)-3 A \sin (2 e+f x)+3 A \sin (2 e+3 f x)+6 A \sin (f x)+3 i B \sin (2 e+f x)-i B \sin (2 e+3 f x))}{12 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 53, normalized size = 0.8 \begin{align*}{\frac{{a}^{2}c}{f} \left ({\frac{i}{3}}B \left ( \tan \left ( fx+e \right ) \right ) ^{3}+{\frac{i}{2}}A \left ( \tan \left ( fx+e \right ) \right ) ^{2}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.59281, size = 72, normalized size = 1.12 \begin{align*} -\frac{-2 i \, B a^{2} c \tan \left (f x + e\right )^{3} - 3 \,{\left (i \, A + B\right )} a^{2} c \tan \left (f x + e\right )^{2} - 6 \, A a^{2} c \tan \left (f x + e\right )}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.25207, size = 262, normalized size = 4.09 \begin{align*} \frac{{\left (12 i \, A + 12 \, B\right )} a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (18 i \, A + 6 \, B\right )} a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (6 i \, A + 2 \, B\right )} a^{2} c}{3 \,{\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 6.42124, size = 150, normalized size = 2.34 \begin{align*} \frac{\frac{\left (4 i A a^{2} c + 4 B a^{2} c\right ) e^{- 2 i e} e^{4 i f x}}{f} + \frac{\left (6 i A a^{2} c + 2 B a^{2} c\right ) e^{- 4 i e} e^{2 i f x}}{f} + \frac{\left (6 i A a^{2} c + 2 B a^{2} c\right ) e^{- 6 i e}}{3 f}}{e^{6 i f x} + 3 e^{- 2 i e} e^{4 i f x} + 3 e^{- 4 i e} e^{2 i f x} + e^{- 6 i e}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.48197, size = 171, normalized size = 2.67 \begin{align*} \frac{12 i \, A a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} + 12 \, B a^{2} c e^{\left (4 i \, f x + 4 i \, e\right )} + 18 i \, A a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} + 6 \, B a^{2} c e^{\left (2 i \, f x + 2 i \, e\right )} + 6 i \, A a^{2} c + 2 \, B a^{2} c}{3 \,{\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]